﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Data;
using System.Windows.Media;

namespace WpfApplication3
{
    class Converters
    {
    }

    public class MTPointConverter:IMultiValueConverter
    {

        public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            PointCollection points = new PointCollection();
            if(values!=null)
            {
                foreach(var obj in values)
                {
                    Point p=(Point)obj;
                    points.Add(p);
                }
            }
            else
            {
                points = new PointCollection() { new Point(0, 100), new Point(100, 50), new Point(200, 100) };
            }
            return points;
        }

        public object[] ConvertBack(object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }


}
